package com.git.service.impl;

import java.io.UnsupportedEncodingException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.serializer.SerializationException;
import org.springframework.stereotype.Service;

import com.git.domain.DemoEntity;
import com.git.mapper.DemoMapper;
import com.git.mapper.DemoRedisDao;
import com.git.service.DemoService;

@Service
public class DemoServiceImpl implements DemoService {
	@Autowired
	private DemoMapper demoMapper;
	

	@Override
	public void putString(String key,String str) throws UnsupportedEncodingException {
		DemoRedisDao.putString(key, str, 0L);
	}


	@Override
	public String getString(String key) {
		return DemoRedisDao.getString(key);
	}


	@Override
	public void putObject(String string, DemoEntity demoEntity) throws SerializationException, Exception {
		DemoRedisDao.putObject(string, demoEntity, 0L);
	}


	@Override
	public Object getObject(String key) {
		return DemoRedisDao.getObject(key);
	}

	
}
